The classical virial expansion expresses the pressure of a many-particle system in equilibrium as a power series in the density. The virial expansion was introduced in 1901 by Heike Kamerlingh Onnes as a generalization of the ideal gas law. He wrote for a gas containing atoms or molecules,
where is the pressure, is the Boltzmann constant, is the absolute temperature, and is the number density of the gas. Note that for a gas containing a fraction of (Avogadro's number) molecules, truncation of the virial expansion after the first term leads to , which is the ideal gas law.
Writing , the virial expansion can be written in closed form as
The virial coefficients are characteristic of the interactions between the particles in the system and in general depend on the temperature .